<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>

<title>Check (randoop 4.1.0 API)</title>

<link rel="stylesheet" type="text/css" href="../../javadocstyle.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Check (randoop 4.1.0 API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":6,"i1":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../randoop/test/CompilableTestPredicate.html" title="class in randoop.test"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?randoop/test/Check.html" target="_top">Frames</a></li>
<li><a href="Check.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">randoop.test</div>
<h2 title="Interface Check" class="title">Interface Check</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../randoop/test/EmptyExceptionCheck.html" title="class in randoop.test">EmptyExceptionCheck</a>, <a href="../../randoop/test/ExceptionCheck.html" title="class in randoop.test">ExceptionCheck</a>, <a href="../../randoop/test/ExpectedExceptionCheck.html" title="class in randoop.test">ExpectedExceptionCheck</a>, <a href="../../randoop/test/InvalidExceptionCheck.html" title="class in randoop.test">InvalidExceptionCheck</a>, <a href="../../randoop/test/InvalidValueCheck.html" title="class in randoop.test">InvalidValueCheck</a>, <a href="../../randoop/test/MissingExceptionCheck.html" title="class in randoop.test">MissingExceptionCheck</a>, <a href="../../randoop/test/NoExceptionCheck.html" title="class in randoop.test">NoExceptionCheck</a>, <a href="../../randoop/test/ObjectCheck.html" title="class in randoop.test">ObjectCheck</a>, <a href="../../randoop/test/PostConditionCheck.html" title="class in randoop.test">PostConditionCheck</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Check</span></pre>
<div class="block">A Check represents the expected runtime behavior of a Sequence, at a particular offset. For
 example, a client might add a <code>NotNull</code> check to the <em>i</em>th index of a sequence to
 signify that the value returned by the statement at index <em>i</em> should not be null.

 <p>When a unit test is run as a regression test, it should have the same behavior as it did
 previously, and the Check objects represent that previous, expected behavior. Some examples of
 Checks are:

 <ul>
   <li><a href="../../randoop/test/ExpectedExceptionCheck.html" title="class in randoop.test"><code>ExpectedExceptionCheck</code></a> -- an exception should be thrown
   <li><a href="../../randoop/test/NoExceptionCheck.html" title="class in randoop.test"><code>NoExceptionCheck</code></a> -- no exception should be thrown
   <li><a href="../../randoop/test/ObjectCheck.html" title="class in randoop.test"><code>ObjectCheck</code></a> -- a particular <a href="../../randoop/contract/ObjectContract.html" title="class in randoop.contract"><code>ObjectContract</code></a> should hold
 </ul>

 The visitor classes decorate a sequence with <code>Check</code> objects. A <code>Check</code> object is
 inserted as a decoration on a specific index of an <a href="../../randoop/sequence/ExecutableSequence.html" title="class in randoop.sequence"><code>ExecutableSequence</code></a>. Thus, a check is
 always associated with a specific index in a sequence. A check at index i means that the check is
 to be performed after statement i finishes executing.

 <p>A check implements two methods that specify the code to be emitted before and/or after a
 statement in a <code>Sequence</code> is executed.

 <p>A check may require some code to be emitted before and/or after the statement is printed. For
 example, a check for checking that <code>x</code> is not null after the statement "<code>Foo x =
 m()</code>" is executed might emit the assertion code "<code>assertNotNull(x); </code>", and would do so
 after the statement is printed. As a second example, a check for checking that an expected
 exception is thrown by a statement would need to emit something like "<code>try {</code>" before
 the statement, and the catch clause after the statement.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../randoop/test/Check.html#toCodeStringPostStatement--">toCodeStringPostStatement</a></span>()</code>
<div class="block">Returns a string of Java source code to be emitted after a statement containing this check.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../randoop/test/Check.html#toCodeStringPreStatement--">toCodeStringPreStatement</a></span>()</code>
<div class="block">Returns a string of Java source code to be emitted before a statement containing this check.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="toCodeStringPreStatement--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCodeStringPreStatement</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toCodeStringPreStatement()</pre>
<div class="block">Returns a string of Java source code to be emitted before a statement containing this check.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the string to be included before the statement</dd>
</dl>
</li>
</ul>
<a name="toCodeStringPostStatement--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toCodeStringPostStatement</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toCodeStringPostStatement()</pre>
<div class="block">Returns a string of Java source code to be emitted after a statement containing this check.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the string to be included following the statement</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../randoop/test/CompilableTestPredicate.html" title="class in randoop.test"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?randoop/test/Check.html" target="_top">Frames</a></li>
<li><a href="Check.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
